package com.cm.stock.manager.service;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BootstrapService {
	private static ApplicationContext CONTEXT;
	private static Logger logger = Logger.getLogger(BootstrapService.class);
	
public static ApplicationContext getCONTEXT() {
		
		try{
			
			if(CONTEXT==null)
				CONTEXT = new ClassPathXmlApplicationContext("spring-config-mysql.xml");
		}catch(Exception e){
			logger.error(e.getMessage(),e);
		}
		return CONTEXT;
	}

}
